using Microsoft.AspNetCore.Builder;

namespace Aurora.Discovery.HttpClient.Abstractions;

/// <summary>
/// discovery client 抽象类
/// </summary>
public interface IDiscoveryClient : IDisposable
{
    /// <summary>
    /// 获取服务
    /// </summary>
    /// <param name="host">host</param>
    /// <returns></returns>
    Task<string> GetService(string host);

    /// <summary>
    /// 启动服务
    /// </summary>
    void Start();

    /// <summary>
    /// 停止服务
    /// </summary>
    void Stop();


    /// <summary>
    /// 使用 相关服务 
    /// </summary>
    /// <param name="app"></param>
    void Use(IApplicationBuilder app);
}